function myFunction() {
    var un = $("#userName").val();
    var pwd = $("#password").val();
    $.ajax({
        url: $("#service").val() + "login/auth",
        type: "post",
        data: {userName: un, password: pwd},
        async: true,
        success: function (result) {
            if (result == '100') {
                window.location.href = $("#service").val();
            } else {
                alert("用户名或密码错误!");
            }
        },
        error: function () {
            alert("初始化失败!");
        },
        timeout: 3000
    });
}
